package com.sinaapp.zhangziyou.action.article;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sinaapp.zhangziyou.action.UBaseController;
import com.sinaapp.zhangziyou.pojo.MainEntity;
import com.sinaapp.zhangziyou.pojo.TagEntity;
import com.sinaapp.zhangziyou.security.WebUserDetails;
import com.sinaapp.zhangziyou.service.ACenterService;

@Controller
@RequestMapping("/a")
public class MianController extends UBaseController{

	private static Logger logger = LoggerFactory.getLogger(MianController.class);
	
	@Autowired
	private ACenterService aCenterService;
	
	@RequestMapping(value = "/article" )
	public String article() {
		return "acenter/article";
	}
	
	@RequestMapping(value = "/addMain" )
	public String addMain(Model model,MainEntity mainEntity,TagEntity tagEntity) {
		aCenterService.saveMainEntity(mainEntity,tagEntity);
		return "acenter/article";
	}
	
	
}
